#include<stdio.h>
int main()
{
	int a,b,c;
	scanf("%d",&a);
	c=a-1;
    b=a*c;
	while(c>1)
	{c--;
	b=b*c;

	}
	printf ("%d",b);
	return 0;
}
